import { createStackNavigator } from '@react-navigation/stack'  
import { NavigationContainer } from '@react-navigation/native'


import React, { Component } from 'react'

import HomeHeader from '../components/Header/Home'
import Welcome from '../pages/Welcom'
import Tab from '../pages/Tab'
import Detail from '../pages/Detail'

const Stack = createStackNavigator()



export default function Navigation( props ) {
  
  // if(props?.isLoading){
  //   return (
  //     <Stack.Navigator>
  //       <Stack.Screen
  //         name='welcome'
  //         component={ Welcome }
  //         options={{
  //           headerShown:false
  //         }}
  //       />
  //     </Stack.Navigator>
  //   )
  // }

  return (
    <Stack.Navigator>
      <Stack.Screen
        name='tab'
        component={ Tab }
        options={{
          header: (props) =>(<HomeHeader></HomeHeader>)
        }}
      />
      <Stack.Screen
        name='detail'
        component={ Detail }
      />
    </Stack.Navigator>
  )
}





